package com.gzk.oeno.tech.ui;

import java.awt.Font;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;

import javax.swing.JLabel;

public class Formator {

	private static final NumberFormat FORM_INT_FORMAT = new DecimalFormat("0");
	private static final NumberFormat FORM_DEC_FORMAT = new DecimalFormat("0.##");
	private static final NumberFormat FORM_CUR_FORMAT = new DecimalFormat("0.00");
	private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy");
	
	private Formator(){}
	
	public static JLabel boldLabel(String title){
		JLabel label = new JLabel(title);
		label.setFont(label.getFont().deriveFont(Font.BOLD));
		return label;
	}
	
	public static SimpleDateFormat getDateFormat(){
		return DATE_FORMAT;
	}
	
	public static NumberFormat getFormIntegerFormat(){
		return FORM_INT_FORMAT;
	}
	
	public static NumberFormat getFormDecimalFormat(){
		return FORM_DEC_FORMAT;
	}
	
	public static NumberFormat getFormCurrencyFormat(){
		return FORM_CUR_FORMAT;
	}
}
